import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    redirect: "/font/window"
  },
  {
    path:"/register",
    name:'register',
    component: () => import('@/views/register/register')
  },
  {
    path:"/login",
    name:'login',
    component: () => import('@/views/login/login')
  },
  {
    path: '/font',
    component: Home,
    redirect:"/font/window",
    children:[
      {
        path:'/font/window',
        name:'window',
        component: () => import('@/components/Windows')
      },
      {
        path:'/font/details',
        name:'details',
        component: () => import('@/components/Details')
      },
      {
        path:'/font/preview',
        name:'preview',
        component: () => import('@/components/Preview')
      },
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
